home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 1102 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.5 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: vandevod@cs.rpi.edu (David Vandevoorde)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: sample auto_ptr template
  5. Date: 15 Apr 1996 14:22:46 PDT
  6. Organization: RPI Computer Science
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <xsospe5me40.fsf@juicer.cs.rpi.edu>
  9. References: <009A04DA6A831C40.49800EAC@ittpub.nl>
  10.     <bill-0804960932250001@bgibbons.vip.best.com>
  11.     <4kcr2d$p03@jabba.lehman.com> <KANZE.96Apr10111407@gabi.gabi-soft.fr>
  12.     <199604121609.MAA27937@jabba.lehman.com>
  13.     <KANZE.96Apr15103504@gabi.gabi-soft.fr>
  14. NNTP-Posting-Host: isolde.mti.sgi.com
  15. X-Original-Date: 15 Apr 1996 16:22:39 -0400
  16. In-Reply-To: kanze@gabi-soft.fr's message of 15 Apr 1996 09:37:10 PDT
  17. X-Newsreader: Gnus v5.1
  18. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  19.     iQBVAwUBMXK+K0y4NqrwXLNJAQHvrwIAxtCIr5tu6J25mphHI32QISI9KjqvQsh5
  20.     PnIdLvc4tkOTpUpiN3jXIuBYfmciK0k00Q2cighgxvpyEQBhvGx4AQ==
  21.     =VJdy
  22. Originator: austern@isolde.mti.sgi.com
  23.  
  24. >>>>> "JK" == J Kanze <kanze@gabi-soft.fr> writes:
  25. [...]
  26. JK> Well, I agree fully that it is bad programming practice to let
  27. JK> exceptions propagate out of a destructor.  At present, however, it
  28. JK> is legal C++ (although if the committee were to declare it
  29. JK> undefined behavior, they wouldn't get any objections from me), and
  30. JK> as such, should be taken into consideration when designing a
  31. JK> *standard* library component.  (I *don't* take it into
  32. JK> consideration when designing my own components.  But: if you don't
  33. JK> like my style, you aren't obliged to use my components.  Everyone
  34.                                                              ^^^^^^^^
  35. JK> has to use the standard components, however.)
  36.     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  37. I would like to contest that ;-)
  38.  
  39. Given the kind of overhead in the ``auto_ptr nouveau'', I'm unlikely
  40. to want to use it... and nothing prevents me from that. As far as I
  41. know, auto_ptr does not have any connections with the rest of the
  42. language (i.e., if it were dropped, there would be no repercussions).
  43. Furthermore, it's really not hard to fashion a auto_ptr-like template
  44. that fits one's desired semantics.
  45.  
  46. In that light, it seems to me that a standard auto_ptr is a little
  47. overkill... Fortunately, I'm not forced to use it and so don't care
  48. too much.
  49.  
  50.     Daveed
  51. ---
  52. [ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
  53.                 newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  54.   comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  55.   Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  56.   Comments? mailto:std-c++-request@ncar.ucar.edu 
  57. ]
  58.